package test.couchdb;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import test.domain.Model3D;

import com.n1global.acc.CouchDb;
import com.n1global.acc.CouchDbConfig;
import com.n1global.acc.annotation.JsView;
import com.n1global.acc.view.CouchDbMapView;
import com.ning.http.client.AsyncHttpClient;

@Component
public class ModelsDb extends CouchDb {
    @JsView(map = "emit([doc.order, doc.title], doc)")
    private CouchDbMapView<String[], Model3D> modelsView;

    @Autowired
    public ModelsDb(CouchDbConfig config, AsyncHttpClient httpClient) {
        super(config, httpClient);
    }

    public CouchDbMapView<String[], Model3D> getModelsView() {
        return modelsView;
    }
}
